﻿using LDM.Framework.WebApiClientCore;
using LDM.Sys.ServiceAPI.Model.DBModel;
using LDM.Sys.ServiceAPI.Model.ViewModel.Request;
using LDM.Sys.ServiceAPI.Model.ViewModel.Request.AuthorityReq;
using LDM.Sys.ServiceAPI.Model.ViewModel.Response.Authority;
using LDM.Sys.ServiceAPI.Model.ViewModel.Response.Login;
using LDM.Sys.ServiceAPI.Model.ViewModel.Response.Menu;
using Microsoft.Extensions.DependencyInjection;
using Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebApiClientCore;
using WebApiClientCore.Attributes;

namespace LDM.Sys.ServiceAPI.Svc
{
    /// <summary>
    /// 菜单服务
    /// </summary>
    [HttpApiOptions("LDM.Sys.API")]
    [LoggingFilter]
    [Timeout(10 * 1000)] // 10s超时
    public interface IAccountService : IHttpApi, IScoped
    {
        /// <summary>
        /// 角色列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost("SysAccount/GetSysAccounts")]
        public Task<PageResult<SysAccount>> GetSysAccounts([JsonContent] GetSysAccountReq request);

        /// <summary>
        ///  添加用户
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost("SysAccount/AddSysAccount")]
        public Task AddSysAccount([JsonContent] AddSysAccountReq request);

        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost("SysAccount/UpdateSysAccount")]
        public Task UpdateSysAccount([JsonContent] UpdateSysAccountReq request);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost("SysAccount/DelSysAccount")]
        public Task DelSysAccount([JsonContent] DelSysAccountReq request);

        /// <summary>
        /// 查询所有用户简要信息
        /// </summary>
        [HttpPost("SysAccount/BriefAccounts")]
        public Task<List<BriefAccountRes>> BriefAccounts();
    }
}
